package fan.com.httpframe.test.navigation;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;

import java.util.ArrayList;

import fan.com.httpframe.fragment.BaseNavPagerFragment;
import fan.com.httpframe.fragment.MyFragment;

/**
 * Created by fanliang on 18/5/23.
 */

public class NavFragment extends BaseNavPagerFragment{
    @Override
    protected String[] getTitles() {
        return new String[]{"aa","bb","cc"};
    }

    @Override
    protected ArrayList<Fragment> fragmentClasses() {
        ArrayList<Fragment> list = new ArrayList<Fragment>();
        list.add(new MyFragment());
        list.add(new MyFragment());
        list.add(new MyFragment());
        return list;
    }
    @Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        setPageAdapter(fragmentClasses(), getTitles());
    }
}
